<script setup>
const machine = [
  '/images/machine1.jpg',
  '/images/machine3.jpg',
  '/images/machine2.png',
  '/images/machine4.jpg'
]
</script>

<template>
  <van-swipe
    class="home-swiper"
    :autoplay="3000"
    indicator-color="var(--van-primary-color)">
    
    <van-swipe-item v-for="item in machine" :key="item" class="swipe-item">
      <img :src="item" class="swipe-image" />
    </van-swipe-item>
    
  </van-swipe>
</template>

<style lang="scss" scoped>
.home-swiper {
  width: 100%;
}

.swipe-item {
  height: 200px; // 你可以按实际设计调整统一高度
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.swipe-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
</style>
